﻿using System;
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json.Serialization;

namespace MVC.Models
{
    public class ReadBook
    {
        public int ReadBookId { get; set; }
        public int Rating { get; set; }

        [DataType(DataType.Date)]
        [Display(Name="Date read")]
        [DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)]
        public DateTime DateRead { get; set; }
        
        public virtual Book Book { get; set; }

        public int BookListId { get; set; }
        public BookList BookList { get; set; }
    }
}